<template>
   
    <div class="ecommerce-links">
       <h2>点击以下链接查看电商平台：</h2>
       <div class="link-container">
         <div class="link-item" @click="setIframeSrc('https://uland.taobao.com/sem/tbsearch?refpid=mm_2898300158_3078300397_115665800437&keyword=%E5%81%A5%E8%BA%AB%E5%99%A8%E6%9D%90&clk1=a632c8931a700f1b0f1507ebab22f650&upsId=a632c8931a700f1b0f1507ebab22f650&spm=a2e0b.20350158.search.1&pid=mm_2898300158_3078300397_115665800437&union_lens=recoveryid%3A201_33.44.185.121_1121083_1719212254539%3Bprepvid%3A201_33.44.185.121_1121083_1719212254539')">
           淘宝
         </div>
         <div class="link-item" @click="setIframeSrc('https://p4psearch.1688.com/page.html?hpageId=old-sem-pc-list&keywords=%E5%81%A5%E8%BA%AB%E5%99%A8%E6%9D%90&cosite=360jj&location=landing_t4&trackid=8857893814811581070789&spm=a2638t.b_30496503.szyx_head.submit&keywordid=68107544884&bt=&exp=&ptid=hrb59d10cb35cf99')">
           1688
         </div>
       </div>
       <iframe class="shop_iframe"
         :src="iframeSrc"
         frameborder="0"
         width="90%"
         height="650px"
       ></iframe>
     </div>
   </template>
   
   <script>
   export default {
     name: 'EcommerceLinks',
     data() {
       return {
         iframeSrc: '', // 初始化为空或者设置为默认页面的URL
       };
     },
     methods: {
       setIframeSrc(url) {
         this.iframeSrc = url; // 更新iframe的src属性
       },
     },
   };
   </script>
   
   <style scoped>
   .ecommerce-links {
     text-align: center;
   }
   
   .link-container {
     margin-bottom: 20px;
   }
   
   .link-item {
     display: inline-block;
     cursor: pointer;
     padding: 10px;
     margin: 5px;
     border: 1px solid #ccc;
     border-radius: 4px;
   }
   
   .link-item:hover {
     background-color: #f5f5f5;
   }
   .shop_iframe{
     position: absolute;
     left:15%;
     top:12%;
   }
   </style>